﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Mydesk.aspx.cs" Inherits="StorageManage.Mydesk" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
    <link href="/Content/themes/gray/easyui.css" rel="stylesheet" />
    <link href="/Content/themes/icon/icon.css" rel="stylesheet" />
    <script src="Scripts/Jquery/jquery-1.11.0.min.js"></script>
    <script src="/Scripts/Easyui/jquery.easyui.min.js"></script>
    <script src="/Scripts/Easyui/easyui-lang-zh_CN.js"></script>
    <script type="text/javascript">
        $(function () {
            $('.divUpdate').mouseover(function () {
                $(this).css('background-color', '#ece3e2');
            }).mouseout(function () {
                $(this).css('background-color', 'none');
            })
        })
        function funcUpdateMaterial() {
            $('.divUpdate').first().css('background-color', '#d5bdb8')
            $.ajax({
                url: '/Logic/BasicInfo.aspx?method=UpdateMaterial',
                dataType:'json',
                success:function(data){
                    if (data.state=='success') {
                        $.messager.show({
                            title: '消息',
                            msg: '更新物料成功',
                            timeout: 5000,
                            showType: 'slide'
                        });
                    } else {
                        $.messager.show({
                            title: '消息',
                            msg: '更新物料失败，请尝试重新更新',
                            timeout: 5000,
                            showType: 'slide'
                        });
                    }
                },
                complete: function () {
                    $('.divUpdate').first().css('background-color', 'none')
                }
            });
        }
        function funcUpdateTaskCode() {
            $('.divUpdate').eq(1).css('background-color', '#d5bdb8')
            $.ajax({
                url: '/Logic/BasicInfo.aspx?method=UpdateTaskCode',
                dataType: 'json',
                success: function (data) {
                    if (data.state == 'success') {
                        $.messager.show({
                            title: '消息',
                            msg: '更新制号成功',
                            timeout: 5000,
                            showType: 'slide'
                        });
                    } else {
                        $.messager.show({
                            title: '消息',
                            msg: '更新制号失败，请尝试重新更新',
                            timeout: 5000,
                            showType: 'slide'
                        });
                    }
                    
                },
                complete: function () {
                    $('.divUpdate').eq(1).css('background-color', 'none')
                }
            });
        }
        function funcUpdateLinLiao() {
            $('.divUpdate').last().css('background-color', '#d5bdb8')
            $.ajax({
                url: '/Logic/BasicInfo.aspx?method=UpdateLinLiao',
                dataType: 'json',
                success: function (data) {
                    if (data.state == 'success') {
                        $.messager.show({
                            title: '消息',
                            msg: '更新领料数据成功',
                            timeout: 5000,
                            showType: 'slide'
                        });
                    } else {
                        $.messager.show({
                            title: '消息',
                            msg: '更新领料数据失败，请尝试重新更新',
                            timeout: 5000,
                            showType: 'slide'
                        });
                    }

                },
                complete: function () {
                    $('.divUpdate').last().css('background-color', 'none')
                }
            });
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div >
        <p>欢迎来到该系统，您可以选择如下操作对系统数据进行更新：</p>
        <div class="divUpdate" style="float:left;width:70px;display: inline-block;vertical-align: middle;text-align:center;margin-right:20px;">
             <a  style="text-decoration-line:none;color:black;font-size:9px;" href="javascript:void(0)" onclick="funcUpdateMaterial()">
            <img src="Images/mms/更新物料.jpg" alt='物料更新'" /><div  style="width:50px;display:inline-block">物料更新</div>
        </a>
        </div>
        <div class="divUpdate" style="float:left;width:70px;display: inline-block;vertical-align: middle;text-align:center;margin-right:20px;">
 <a href="javascript:void(0)" style="text-decoration-line:none;color:black;font-size:9px;" onclick="funcUpdateTaskCode()">
            <img src="Images/mms/更新制号.png" alt="制号更新" /><div style="width:50px;display:inline-block">制号更新</div></a>
        </div>
        <div class="divUpdate" style="float:left;width:70px;display: inline-block;vertical-align: middle;text-align:center;">
 <a href="javascript:void(0)" style="text-decoration-line:none;color:black;font-size:9px;" onclick="funcUpdateLinLiao()">
            <img src="Images/mms/领料数据更新.png" alt="领料更新" /><div style="width:50px;display:inline-block">领料更新</div></a>
        </div>
    </div>
    </form>
</body>
</html>
